<?php
class stFacebookGallery_model extends stmodel_2_1{

    public function __construct($config) {
        parent::__construct ( $config );
        $this->setTableName('st_ap_gallery');
        $this->setPrimaryKey('id');
    }
    public function check_album($picture,$album){
        global $current_user;
        if($this->get_var("SELECT COUNT(*) FROM st_gallery_album WHERE user_id = ".$current_user->ID." AND picture_id = ".$picture." AND album_id = ".$album) > 0){
            return true;
        }
        else 
        {
            return false;
        }
    }
    


}